package com.xyh.mapper;

import com.xyh.entity.YxcUser;
import org.apache.ibatis.annotations.*;

@Mapper
public interface YxcLoginMapper {
    @Select("select login_password from yxc_login where login_telephone = #{login_telephone} and flag = 1 ")
    String selectPwdByPhone(@Param("login_telephone") String login_telephone);

    @Insert("insert into yxc_login(login_telephone,login_password) values(#{login_telephone},#{login_password})")
    int insertNewLogin(@Param("login_telephone") String login_telephone,@Param("login_password") String login_password);

    @Update("update yxc_login set login_password = #{password} ,state = 1 where login_telephone = #{telephone}")
    int updateYxcLogin(YxcUser yxcUser);
}
